There are known concepts of the conversion of heat energy into mechanical energy, where temperature and pressure is changed in the workspace with alternately changing volume. As the volume decreases, temperature and pressure increase both due to this volume change and primarily, in the last stage, due to the volume decreasing, or optionally, in the first stage due to the volume reincreasing, by the additional supply of heat energy either from the exterior, or from the heat generation (e.g. combustion) inside the workspace. As the volume reincreases, the pressure (originated from the previous workspace volume decreasing), after loss deduction, performs the work needed for consecutive volume decreasing. While the pressure, originated from the additional heat energy supply, after the loss deduction, performs the resulting mechanical work. At the permanently closed work space concept, the work medium temperature (due to the additional heat energy supply) would be, at the end of the operating cycle, greater than the temperature at the beginning of the previous volume increasing. So that, during an exterior heat supply, the medium temperature would reach the temperature, where the heat is supplied from the exterior and the temperature difference and also volume of the supplied heat would be, without a view to the losses, zero. The heat supply, developed in the medium, would stop due to the lack of oxygen, at the permanently closed workspace. It is therefore necessary to open the workspace for the used medium exhaust and the fresh medium supply for a certain time, namely both at the beginning of the volume decreasing, or before it and at the end of the volume increasing, or after it. The power cycle of the pressure and temperature variations, during the volume increasing and decreasing, proceeds in two stages. If there are other two stages added to the previous ones (i.e. volume increasing for the used medium supply and volume decreasing for the used medium exhaust) then there is the four-cycle process of the conversion of heat energy into mechanical energy implemented. If the medium supply and exhaust take place at the beginning of the first stage, or respectively at the end of the second stage, then the two-cycle process is implemented. All of these processes take place according to the known state of art in one workspace, exceptionally divided into two parts.